function deletel(url,id)
{
    //删除确认框
    layer.confirm('您确定删除吗？', {
      btn: ['确定','取消'] //按钮
    }, function(){
        todelete(url,id);
    }, function(){});
}
function fun(url,id,msg)
{
    layer.confirm(msg, {
      btn: ['确定','取消'] //按钮
    }, function(){
        todelete(url,id);
    }, function(){});
}
//删除操作回调
function todelete(url,id)
{
    $.post(url,{id:id},function(s){
        if(s.status==1){
            layer.msg(s.msg, {icon: 1,time:1000},function(){
                location.reload();
            });
        }else{
            layer.msg(s.msg, {icon: 2,time:1000},function(){
                location.reload();
            });
        }
    },"JSON");
}
